Hello, My requirements are: 1. I have to add new checkbox to create a new baseline before creating the test run which my script was doing before(already existing script).
2. The description field in the new baseline dialogue shall contain the following text: I have already done the scripting part to add the new checkbox but the DIALOG BOX for creating new baseline is appearing before the actual GUI, But I need the create baseline only after clicking on CREATE button on GUI. I am also getting the following run time error:
-R-E- DXL: <Line:672> array bounds exceeded (-1) Can any one please help me out. I have also attached my script.
KBSri - Tue Jun 17 05:32:09 EDT 2014 |
Re: Add a checkbox to create a baseline before running the script
I've not checked through the complete script. But I see the following include statement in the beginning of the script: |
Re: Add a checkbox to create a baseline before running the script SudarshanRao - Tue Jun 17 06:38:00 EDT 2014
I've not checked through the complete script. But I see the following include statement in the beginning of the script: Hello Sudharsan, Thanks a lot for your response.It was different version. I have edited now and update the new script in the same post the error is in the following line: -R-E- DXL: <Line:672> array bounds exceeded (-1) : sTestRunNumber = ((GetTestRunCount(sProjects[iProject]) + 1)"") I tried giving the following declaration inside the following IF statement but I was getting error.
The line which I inserted is : if (get(dbeCreateBaseline) == 0) #include <standard\\baseline\\createBaseline.inc> Errors are:
-E- DXL: <standard/baseline/baselineList.inc:23> non local variable access (listItems)
|
Re: Add a checkbox to create a baseline before running the script KBSri - Tue Jun 17 08:16:00 EDT 2014 Hello Sudharsan, Thanks a lot for your response.It was different version. I have edited now and update the new script in the same post the error is in the following line: -R-E- DXL: <Line:672> array bounds exceeded (-1) : sTestRunNumber = ((GetTestRunCount(sProjects[iProject]) + 1)"") I tried giving the following declaration inside the following IF statement but I was getting error.
The line which I inserted is : if (get(dbeCreateBaseline) == 0) #include <standard\\baseline\\createBaseline.inc> Errors are:
-E- DXL: <standard/baseline/baselineList.inc:23> non local variable access (listItems)
About the array related error: So it appears like there's some calculation going wrong with sProjects[], you'll probably need to insert some debug statements in your script to figure out what's going beyond the array size.. About createBaseline.inc, I should have mentioned that you can't use that #include from within a function though.. So you'll have to either alter the flow of the script such that the #include statement isn't within a function, or create your own dialog box for baseline creation as well.. |
Re: Add a checkbox to create a baseline before running the script Array: This error indicates your array index is -1:
Lines 671 and 672 are:
Clearly dialog element "dbeProjectName" has nothing in it, iProject ends up being "-1", and the sProjects[] lookup fails. You should insert something like this:
Include: Invoking native include files can be tricky. In this case the include file defines the dialog AND then "show"s it. I'm not very good at this myself, but your choices are:
Someone else will need to help with that. Attempting to put the #include in a conditional statement will fail. DXL disallows normal nesting of variables; all globabl variables MUST be at the global context, and putting it into an "if" statement puts it in a non-global context:
And I'd like to point out that the #include reference is resolved when the code is interpreted; so you clearly cannot use conditional logic to determine which #include to actually use. -Louie |
Re: Add a checkbox to create a baseline before running the script Please help me. |
Re: Add a checkbox to create a baseline before running the script The only way I've found of preventing #include of a file, is to halt the script before the inclusion. E.g.:
if (!confirm("baseline?")) halt It may be possible to restructure the workflow to use this approach. |
Re: Add a checkbox to create a baseline before running the script KBSri - Mon Jun 30 05:18:48 EDT 2014 Please help me. Glancing at the code, I see lines 1260/1261:
That means after the dialog gets "released", it will create the baseline. I see it is "released" in your "close" function "CloseDB" (line 995). Clearly you don't want to do that. I see that "doCreateBaseline()" is tied to your checkBox dbeCreateBaseline (line 1114); no doubt that is when you want to perform the baseline. -Louie Here is an artical on construction of a "block" dialog:
|
Re: Add a checkbox to create a baseline before running the script llandale - Mon Jun 30 14:54:01 EDT 2014 Glancing at the code, I see lines 1260/1261:
That means after the dialog gets "released", it will create the baseline. I see it is "released" in your "close" function "CloseDB" (line 995). Clearly you don't want to do that. I see that "doCreateBaseline()" is tied to your checkBox dbeCreateBaseline (line 1114); no doubt that is when you want to perform the baseline. -Louie Here is an artical on construction of a "block" dialog:
Thank you all . I resolved it. Thanks a ton louie :) |